<!-- $Id: brand_info.htm 14216 2008-03-10 02:27:21Z testyang $ -->
<?php echo $this->fetch('pageheader.htm'); ?> <?php echo $this->smarty_insert_scripts(array('files'=>'../js/utils.js,selectzone.js,validator.js')); ?><div id="tabbar-div">		<p>			<span class="tab-back" id="general-tab">通用信息</span>			<span class="tab-back" id="detail-tab">品牌简介</span>		</p>	</div>
<div class="tabbody-div">
<form method="post" action="brand.php" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
<table cellspacing="1" cellpadding="3" width="100%" id="general-table">
  <tr>
    <td class="label"><?php echo $this->_var['lang']['brand_name']; ?></td>
    <td><input type="text" name="brand_name" maxlength="60" value="<?php echo $this->_var['brand']['brand_name']; ?>" /><?php echo $this->_var['lang']['require_field']; ?></td>
  </tr>	  <tr>    <td class="label"><?php echo $this->_var['lang']['brand_short']; ?></td>    <td><select name="brand_short" >    					<?php $_from = $this->_var['brand_shortoo']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('num', 'book');if (count($_from)):
    foreach ($_from AS $this->_var['num'] => $this->_var['book']):
?>     									<?php if ($this->_var['num'] == $this->_var['brand']['brand_short']): ?>    									<option value="<?php echo $this->_var['num']; ?>" selected="selected"><?php echo $this->_var['book']; ?></option>    									<?php else: ?>							       	<option value="<?php echo $this->_var['num']; ?>"><?php echo $this->_var['book']; ?></option>							       	<?php endif; ?>							<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>     		</select>    </td>  </tr>  	  <tr>    <td class="label"><?php echo $this->_var['lang']['brand_other_name']; ?></td>    <td><input type="text" name="brand_other_name" maxlength="40" size="15" value="<?php echo $this->_var['brand']['brand_other_name']; ?>" />    </td>  </tr>  <tr>    <td class="label"><?php echo $this->_var['lang']['brand_classify']; ?></td>    <td>    		<!--<select name="brand_cat" >
    					<?php $_from = $this->_var['brand_cat']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('num', 'cat');if (count($_from)):
    foreach ($_from AS $this->_var['num'] => $this->_var['cat']):
?> 
    									<?php if ($this->_var['cat']['cat_id'] == $this->_var['brand']['brand_cat']): ?>
    									<option value="<?php echo $this->_var['cat']['cat_id']; ?>" selected="selected"><?php echo $this->_var['cat']['cat_name']; ?></option>
    									<?php else: ?>
    									<option value="<?php echo $this->_var['cat']['cat_id']; ?>"><?php echo $this->_var['cat']['cat_name']; ?></option>
    									<?php endif; ?>
							       
							<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?> 
    		</select>-->    		<!--<?php $_from = $this->_var['brand_cat']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('num', 'cat');if (count($_from)):
    foreach ($_from AS $this->_var['num'] => $this->_var['cat']):
?> 
    			<?php $_from = $this->_var['val_arr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('yy', 'tt');if (count($_from)):
    foreach ($_from AS $this->_var['yy'] => $this->_var['tt']):
?> 
						<?php if ($this->_var['cat']['cat_id'] == $this->_var['tt']): ?>
								<input type="checkbox" name="brand_cat[]" value="<?php echo $this->_var['cat']['cat_id']; ?>" checked><?php echo $this->_var['cat']['cat_name']; ?>
						<?php else: ?>
						<?php if ($this->_var['yy'] == 0): ?>
    					<input type="checkbox" name="brand_cat[]" value="<?php echo $this->_var['cat']['cat_id']; ?>" ><?php echo $this->_var['cat']['cat_name']; ?>
    				<?php endif; ?>
    			<?php endif; ?>
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?> 		
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?> -->				<?php $_from = $this->_var['val_arr']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('yy', 'tt');if (count($_from)):
    foreach ($_from AS $this->_var['yy'] => $this->_var['tt']):
?> 				<?php echo $this->_var['tt']; ?>				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>    </td>  </tr>
  <!--<tr>

    <td class="label"><?php echo $this->_var['lang']['site_url']; ?></td>

    <td><input type="text" name="site_url" maxlength="60" size="40" value="<?php echo $this->_var['brand']['site_url']; ?>" /></td>

  </tr>-->
  <tr>
    <td class="label"><a href="javascript:showNotice('warn_brandlogo');" title="<?php echo $this->_var['lang']['form_notice']; ?>">
        <img src="images/notice.gif" width="16" height="16" border="0" alt="<?php echo $this->_var['lang']['form_notice']; ?>"></a><?php echo $this->_var['lang']['brand_logo']; ?></td>
    <td><input type="file" name="brand_logo" id="logo" size="45"><?php if ($this->_var['brand']['brand_logo'] != ""): ?><input type="button" value="<?php echo $this->_var['lang']['drop_brand_logo']; ?>" onclick="if (confirm('<?php echo $this->_var['lang']['confirm_drop_logo']; ?>'))location.href='brand.php?act=drop_logo&id=<?php echo $this->_var['brand']['brand_id']; ?>'"><?php endif; ?>
    <br /><span class="notice-span" <?php if ($this->_var['help_open']): ?>style="display:block" <?php else: ?> style="display:none" <?php endif; ?> id="warn_brandlogo">
    <?php if ($this->_var['brand']['brand_logo'] == ''): ?>
    <?php echo $this->_var['lang']['up_brandlogo']; ?>
    <?php else: ?>
    <?php echo $this->_var['lang']['warn_brandlogo']; ?>
    <?php endif; ?>
    </span>
    </td>
  </tr>    <tr>    <td class="label"></td>    <td><?php if ($this->_var['brand']['brand_logo'] != ""): ?>    	<img src="<?php echo $this->_var['brand']['brand_logo']; ?>" height="100" width="100">    	<?php endif; ?>    </td>  </tr>  <tr>    <td class="label"><a href="javascript:showNotice('warn_brandlogo');" title="<?php echo $this->_var['lang']['form_notice']; ?>">        <img src="images/notice.gif" width="16" height="16" border="0" alt="<?php echo $this->_var['lang']['form_notice']; ?>"></a><?php echo $this->_var['lang']['brand_logo_big']; ?></td>    <td><input type="file" name="brand_logo_big" id="logo" size="45"><?php if ($this->_var['brand']['brand_logo_big'] != ""): ?><input type="button" value="<?php echo $this->_var['lang']['drop_brand_logo']; ?>" onclick="if (confirm('<?php echo $this->_var['lang']['confirm_drop_logo']; ?>'))location.href='brand.php?act=drop_logo_big&id=<?php echo $this->_var['brand']['brand_id']; ?>'"><?php endif; ?>    <br /><span class="notice-span" <?php if ($this->_var['help_open']): ?>style="display:block" <?php else: ?> style="display:none" <?php endif; ?> id="warn_brandlogo">    <?php if ($this->_var['brand']['brand_logo_big'] == ''): ?>    <?php echo $this->_var['lang']['up_brandlogo_big']; ?>    <?php else: ?>    <?php echo $this->_var['lang']['warn_brandlogo_big']; ?>    <?php endif; ?>    </span>    </td>  </tr>    <tr>    <td class="label"></td>    <td><?php if ($this->_var['brand']['brand_logo_big']): ?>    	<img src="<?php echo $this->_var['brand']['brand_logo_big']; ?>" height="100" width="100">    	<?php endif; ?>    </td>  </tr>    <tr>    <td class="label"><a href="javascript:showNotice('warn_brandlogo');" title="<?php echo $this->_var['lang']['form_notice']; ?>">        <img src="images/notice.gif" width="16" height="16" border="0" alt="<?php echo $this->_var['lang']['form_notice']; ?>"></a><?php echo $this->_var['lang']['brand_logo_small']; ?></td>    <td><input type="file" name="brand_logo_small" id="logo" size="45"><?php if ($this->_var['brand']['brand_logo_small'] != ""): ?><input type="button" value="<?php echo $this->_var['lang']['drop_brand_logo']; ?>" onclick="if (confirm('<?php echo $this->_var['lang']['confirm_drop_logo']; ?>'))location.href='brand.php?act=drop_logo_small&id=<?php echo $this->_var['brand']['brand_id']; ?>'"><?php endif; ?>    <br /><span class="notice-span" <?php if ($this->_var['help_open']): ?>style="display:block" <?php else: ?> style="display:none" <?php endif; ?> id="warn_brandlogo">    <?php if ($this->_var['brand']['brand_logo_small'] == ''): ?>    <?php echo $this->_var['lang']['up_brandlogo_small']; ?>    <?php else: ?>    <?php echo $this->_var['lang']['warn_brandlogo_small']; ?>    <?php endif; ?>    </span>    </td>  </tr>
  <tr>

    <td class="label"></td>

    <td><?php if ($this->_var['brand']['brand_logo_small']): ?>    	<img src="<?php echo $this->_var['brand']['brand_logo_small']; ?>" height="100" width="100">    	<?php endif; ?>    </td>

  </tr>
  <tr>
    <td class="label"><?php echo $this->_var['lang']['sort_order']; ?></td>
    <td><input type="text" name="sort_order" maxlength="40" size="15" value="<?php echo $this->_var['brand']['sort_order']; ?>" /></td>
  </tr>
  <tr>
    <td class="label">品牌分类</td>
    <td>
		<input type="radio" name="brand_type" value="0" <?php if ($this->_var['brand']['brand_type'] == 0): ?>checked="checked"<?php endif; ?> /> 国内品牌
        <input type="radio" name="brand_type" value="1" <?php if ($this->_var['brand']['brand_type'] == 1): ?>checked="checked"<?php endif; ?> /> 国外品牌
    </td>
  </tr>    <tr>

    <td class="label">是否热销品牌</td>

    <td>

		<input type="radio" name="is_hot" value="0" <?php if ($this->_var['brand']['is_hot'] == 0): ?>checked="checked"<?php endif; ?> /> <?php echo $this->_var['lang']['no']; ?>

        <input type="radio" name="is_hot" value="1" <?php if ($this->_var['brand']['is_hot'] == 1): ?>checked="checked"<?php endif; ?> /> <?php echo $this->_var['lang']['yes']; ?>

    </td>

  </tr>
  <tr>
    <td class="label"><?php echo $this->_var['lang']['is_show']; ?></td>
    <td><input type="radio" name="is_show" value="1" <?php if ($this->_var['brand']['is_show'] == 1): ?>checked="checked"<?php endif; ?> /> <?php echo $this->_var['lang']['yes']; ?>
        <input type="radio" name="is_show" value="0" <?php if ($this->_var['brand']['is_show'] == 0): ?>checked="checked"<?php endif; ?> /> <?php echo $this->_var['lang']['no']; ?>
        (<?php echo $this->_var['lang']['visibility_notes']; ?>)
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center"><br />
    </td>
  </tr>
</table><table width="90%" id="detail-table" style="display:none">				<tr>					<td><?php echo $this->_var['FCKeditor']; ?></td>				</tr>			</table><div class="button-div" > 			<input type="submit" class="button" value="<?php echo $this->_var['lang']['button_submit']; ?>" />      <input type="reset" class="button" value="<?php echo $this->_var['lang']['button_reset']; ?>" />      <input type="hidden" name="act" value="<?php echo $this->_var['form_action']; ?>" />      <input type="hidden" name="old_brandname" value="<?php echo $this->_var['brand']['brand_name']; ?>" />      <input type="hidden" name="id" value="<?php echo $this->_var['brand']['brand_id']; ?>" />      <input type="hidden" name="old_brandlogo" value="<?php echo $this->_var['brand']['brand_logo']; ?>"></div>
</form>
</div>
<?php echo $this->smarty_insert_scripts(array('files'=>'../js/utils.js,validator.js')); ?>

<script language="JavaScript">
<!--
document.forms['theForm'].elements['brand_name'].focus();
onload = function()
{
    // 开始检查订单
    startCheckOrder();
}document.getElementById("tabbar-div").onmouseover = function(e)		{		    var obj = Utils.srcElement(e);				    if (obj.className == "tab-back")		    {obj.className = "tab-hover";}		}				document.getElementById("tabbar-div").onmouseout = function(e)		{		    var obj = Utils.srcElement(e);				    if (obj.className == "tab-hover")		    {obj.className = "tab-back";}		}				document.getElementById("tabbar-div").onclick = function(e)		{		    var obj = Utils.srcElement(e);				    if (obj.className == "tab-front")		    {return;}		    else		    {		        objTable = obj.id.substring(0, obj.id.lastIndexOf("-")) + "-table";				        var tables = document.getElementsByTagName("table");		        var spans  = document.getElementsByTagName("span");				        for (i = 0; i < tables.length; i++)		        {		            if (tables[i].id == objTable)		            {tables[i].style.display = (Browser.isIE) ? "block" : "table";}		            else		            {tables[i].style.display = "none";}		        }		        for (i = 0; spans.length; i++)		        {		            if (spans[i].className == "tab-front")		            {spans[i].className = "tab-back";		                obj.className = "tab-front";		                break;}		        }		    }		}
/**
 * 检查表单输入的数据
 */
function validate()
{
    validator = new Validator("theForm");
    validator.required("brand_name",  no_brandname);
    validator.isNumber("sort_order", require_num, true);
    return validator.passed();
}
//-->
</script>

<?php echo $this->fetch('pagefooter.htm'); ?>